package com.itheima.多线程.基础;

public class Demo10 extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(getName() + "..." + i);
        }
    }
}


class Demo10x extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(getName() + "..." + i);
        }
    }
}

class Test10 {
    public static void main(String[] args) {
        Demo10 demo1=new Demo10();
        demo1.setName("女神");
        Demo10x demo2=new Demo10x();
        demo2.setName("备胎");
        demo2.setDaemon(true);
        demo1.start();
        demo2.start();

    }
}